
window.charts_server = "/report";
window.action_suffix="do";
m_setConfig();
function m_setConfig() {
    // 用于分享时生成链接
    window.local_server = (function (url) {
        if (url.indexOf('/src/') > 0) {
            return url.substring(0, url.indexOf('/src/'))
        } else {
            return url
        }
    })(location.href);
    
    window.reportOption = {
    	project_type:"ent",
    	showWelcome:false,
    	showReportViewLog:false,
    	dataSourceManage : {
			getDatasourceList : window.charts_server + "/Report-DataSourceManagement."+window.action_suffix+"?method=queryDataSourceForList",
			getDataSource : window.charts_server + "/Report-DataSourceManagement."+window.action_suffix+"?method=getDataSourceById",
			updateDataSource : window.charts_server + "/Report-DataSourceManagement."+window.action_suffix+"?method=updateDataSource",
			checkName : window.charts_server + "/Report-DataSourceManagement."+window.action_suffix+"?method=getNameCheck",
			createDataSource : window.charts_server + "/Report-DataSourceManagement."+window.action_suffix+"?method=createDataSource",
			modifyDatasource : window.charts_server + "/Report-DataSourceManagement."+window.action_suffix+"?method=modifyDatasource",
			deleteDatasource : window.charts_server + "/Report-DataSourceManagement."+window.action_suffix+"?method=deleteDataSource",
			testConnection : window.charts_server + "/Report-DataSourceManagement."+window.action_suffix+"?method=testConnection",
			getDbTypeList : window.charts_server + "/Report-DataSourceManagement."+window.action_suffix+"?method=queryDataSourceTypeForList"
		},
		carouselManage : {
			getCarouselResourceList : window.charts_server + "/Report-AppCarouselAction."+window.action_suffix+"?method=queryCarouselForList",
			fileUploadImage : window.charts_server + "/Report-AppCarouselAction."+window.action_suffix+"?method=fileUploadImage",
			fileDeleteImage : window.charts_server + "/Report-AppCarouselAction."+window.action_suffix+"?method=fileDeleteImage",
			createCarouselResource : window.charts_server + "/Report-AppCarouselAction."+window.action_suffix+"?method=createCarouselResouce",
			deleteCarouselResource : window.charts_server + "/Report-AppCarouselAction."+window.action_suffix+"?method=deleteCarouselResource",
			sortCarouselResource : window.charts_server + "/Report-AppCarouselAction."+window.action_suffix+"?method=sortCarouselResource"
		},
		commonResourceManage : {
			getCommonResource : window.charts_server + "/Report-PhoneAppAction."+window.action_suffix+"?method=getResourceTree",
			getCommonResourceList : window.charts_server + "/Report-PhoneAppAction."+window.action_suffix+"?method=getResourceList",
			createCommonResource : window.charts_server + "/Report-PhoneAppAction."+window.action_suffix+"?method=createResource",
			deleteCommonResource : window.charts_server + "/Report-PhoneAppAction."+window.action_suffix+"?method=deleteResource",
			getCommonResourceByPId : window.charts_server + "/Report-PhoneAppAction."+window.action_suffix+"?method=getResourceTreeByParentId",
			sortCommonResource : window.charts_server + "/Report-PhoneAppAction."+window.action_suffix+"?method=sortMobileResource"
		},
		myResourceManage : {
			getMyResource : window.charts_server + "/Report-PhoneAppAction."+window.action_suffix+"?method=getPermiResourceTree"
		},
		reportAuthPath : {
			getReportTree : window.charts_server + "/Report-AuthorizationAction."+window.action_suffix+"?method=getReportTree",
			getResourceTree : window.charts_server + "/Report-AuthorizationAction."+window.action_suffix+"?method=getResourceTree",
			getPermit : window.charts_server + "/Report-AuthorizationAction."+window.action_suffix+"?method=getPermit",
			grantPermission : window.charts_server + "/Report-AuthorizationAction."+window.action_suffix+"?method=grantPermission"
		},
		taskSchedualerManage : {
			newFolderRemove : window.charts_server + "/Report-MyReportOperator."+window.action_suffix+"?method=newFolderRemoveForSchedular"
		},
		reportResource:{
			getResourceTree:window.charts_server + "/Report-TreeView."+window.action_suffix+"?method=getResourceTree"
		},
		reportShow:{
			entryShow: window.charts_server + "/Report-EntryAction."+window.action_suffix,
			guageShow:window.charts_server + "/Report-GuageAction."+window.action_suffix
		},
		areaMatch : {
			areaCustom : window.charts_server + "/Report-AreaCustomAction."+window.action_suffix+"?method=getAreaCustom",
			areaList : window.charts_server + "/Report-AreaCustomAction."+window.action_suffix+"?method=getAreaList",
			addArea : window.charts_server + "/Report-AreaCustomAction."+window.action_suffix+"?method=addArea",
			updateArea : window.charts_server + "/Report-AreaCustomAction."+window.action_suffix+"?method=updateArea" 
		},
		geoMatch : {
			geoCustom : window.charts_server + "/Report-GeoCustomAction."+window.action_suffix+"?method=getCustomList",
			geoList : window.charts_server + "/Report-GeoCustomAction."+window.action_suffix+"?method=getBaseList",
			modifySystemList : window.charts_server + "/Report-GeoCustomAction."+window.action_suffix+"?method=modifySystemList",
			modifyCustomList : window.charts_server + "/Report-GeoCustomAction."+window.action_suffix+"?method=modifyCustomList",
			reset : window.charts_server + "/Report-GeoCustomAction."+window.action_suffix+"?method=reset"
		},
		resourceViewLog : {
			getLogList : window.charts_server + "/Report-ResourceViewLog."+window.action_suffix+"?method=createResourceViewLog",
			exportToExcel : window.charts_server + "/Report-ResourceViewLog."+window.action_suffix+"?method=getShowDataExportExcel"
		}
	};

    window.datavizOption = {
        env: "production",                                                        //运行环境，开发环境还是生产环境
        title: "UniEAP Report",                                                     //应用名称
        showHeader: true,                                                          //是否显示DataViz的页面Header
        showAside: true,                                                           //是否显示DataViz的左侧Aside
        showCooperation: true,                                                     //是否显示公共项目菜单
        showSample: true,                                                          //是否显示示例
        showSysSetting: true,                                                      //是否显示系统设置
        showLicense: true,                                                         //是否显示license菜单
        isShowMenuSetting: false,                                                  //是否显示按钮来显示与隐藏菜单
        urlLogin: false,                                                           //是否开启URL传参登录功能
        dataVizOrReportScheduler: false,                                           //调度功能在DataViz或Report中
        mobile :{
            fiterChartCompIds: ['71', '72', '73' ,'61', '62', '67', '75']              //移动端播放过滤的图表类型compId
        },
        contextMenu: {
            //上卷
            rollUp: true,
            //下钻
            drillDown: true,
            //钻透（详细信息），支持自定义函数
            drillThrough: true,
            //图表数据
            showData: true,
            //自定义
            custom: [
                /*{
                 //显示名称
                 name: "自定义菜单1",
                 //执行函数，args为当前单击区域的信息
                 callback: function (args) {
                 alert('自定义菜单2');
                 }
                 }*/
            ]
        },
        gis: {
            Gaode: {
                key: ''
            },
            Baidu: {
                key: ''
            },
            Mapbox: {
                key: ''
            },
            Bing: {
                key: ''
            },
            WMS: {
                address: {
                    name: "服务地址",
                    type: "string",
                    url: "http://10.4.45.227:8090/iserver/services/map-china400/wms130"
                },
                coordinate: {
                    name: "坐标系",
                    type: "string",
                    kind: "EPSG:3857"
                },
                layerName: {
                    name: "地图名称",
                    type: "string",
                    title: "China"
                },
                zoom: {
                    name: "缩放层级",
                    type: "number",
                    level: 21
                },
                extent: {
                    name: "地图范围",
                    type: "array",
                    extentArr: [-20037508.34, -20037508.34, 20037508.34, 20037508.34]
                }
            },
            WMTS: {
                address: {
                    name: "服务地址",
                    type: "string",
                    url: "http://10.4.45.227:8090/iserver/services/map-world/wmts-china/1.0.0/WMTSCapabilities.xml"
                },
                coordinate: {
                    name: "坐标系",
                    type: "string",
                    kind: "EPSG:4326"
                },
                layerName: {
                    name: "地图名称",
                    type: "string",
                    title: "世界地图_Day"
                },
                zoom: {
                    name: "缩放层级",
                    type: "number",
                    level: 17
                },
                matrixSet: {
                    name: "MatrixSet名称",
                    type: "string",
                    title: "ChinaPublicServices_世界地图_Day"
                }
            }
        }
    };

   
}